import React from 'react';
import { Space, Checkbox, Tag } from "antd";

const DbSelect = (props) => {
  const { data } = props;

  return (
    <div style={{ border: "1px solid #eee", width: 200, height: 150, padding: 10, marginRight: 10 }}>
      <Space style={{ borderBottom: "1px solid #eee", padding: "0 0 10px" }}>
        <Checkbox></Checkbox>
        <span>单元名：{data.source_db_unit}</span>
      </Space>
      <Space direction="vertical" size={5} style={{ marginTop: 10 }}>
        <span>数据库类型：{data.source_db_type}</span>
        <span>数据库名：{data.source_db_name}</span>
        <span>流量状态：{data.flow_status == 0 ? <Tag color="green">在当前</Tag> : <Tag color="red">不在当前</Tag>}</span>
      </Space>
    </div>
  );

}

export default DbSelect